<?php
	if (isset($_SESSION['login']) && $_SESSION['login'] == true) {
		header ("Location: listinnovation.php");
	}
	session_start();
	include("LangHeader.php");
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="stylesheet" type="text/css" href="style.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<?php echo $LangScript; ?>
<title>Sales Makeover</title>
</head>

<body>
	<div class="container_head_Meny">
		<div class="container_head_content">
			<div style='height:32px;'>
				<div style='float:right;'>
					<a href="#" onclick='ChangeLang("en");'><img height="30" width="30" src="content/icon_eng_default.png" style='padding-top:10px;padding-right:10px;' ></a>
					<a href="#" onclick='ChangeLang("se");'><img height="30" width="30" src="content/icon_swe_default.png" style='padding-top:10px;padding-right:15px;' ></a>
				</div>
			</div>
		</div>
	</div>
		
	<div class="container_head_img">
		<img src="content/salesmakeover_logo.png" style="width:130px;" />
	</div>
	
		
	<div class="container" style="padding-top:20px";>
		<div class="form_container">
			<form id="form_login" class="form_login" method="post" action="login.php" accept-charset="UTF-8">
				<div class="tr" key="username" style="color:white; padding-left:8%;" ></div>
				<input type="email" name="username">
				<div class="tr" key="password" style="color:white; padding-left:8%;"></div>
				<input type="password" name="password">
				
				<div class="forgotten_password" style='text-align:right;  margin-right:8%'><a href="forgottenpassword.php"class="tr" style="  color:white;" key="forgotten_password"></a></div>
				<input type="submit" style="margin-top:35px;" class="tr" key="login">
			</form>
			<?php if(isset($_SESSION["message"])){ $message = $_SESSION['message']; echo "<script type='text/javascript'>alert('$message');</script>"; unset($_SESSION['message']); } ?>
		</div>
	</div>
	</div>
</body>

</html>
<script type="text/javascript">
function ChangeLang(lang)
{
	var dataString = 'lang=' + lang;

        $.ajax({

            type: "POST",
            url: "changeLang.php",
            data: dataString,
            cache: false,
            success: function(response) {
                    location.reload();
                }
        });

        return false;
};
</script>
